<?PHP
  INCLUDE "F_CONX.php";
  $V_USU=$HTTP_POST_VARS["LOGIN"];
  $V_PWD=$HTTP_POST_VARS["PW"];
  IF ($V_USU!="" AND $V_PWD!="")
  {
  	 $MS_SQL    = "SELECT * FROM areas WHERE clave='$V_USU' AND pwd='$V_PWD'";
     $MS_RESULT = MYSQL_QUERY($MS_SQL);
     $V_NUM     = MYSQL_NUM_ROWS($MS_RESULT);
     IF ($V_NUM > 0)
     {
//        echo "encontro registro";
	    $_SESSION['DIVISION'] = $V_USU;
	    HEADER ("LOCATION: P_CONT.php");
     }
     ELSE
       HEADER ("LOCATION: M_LOGIN.php");
     
  }
  else
       HEADER ("LOCATION: INDEX.php");
?>
